/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EDT.obj;

/**
 *
 * @author ali
 */
public class StratInterv implements Strategy{

    public StratInterv() {
    }

    @Override
    public int getId(Creneau c) {
        return c.getIdEns();
    }

    @Override
    public String getIdCompteur(Creneau c) {
        if(c.getType().equals("td")) return c.getIdEc()+"i";
        if(c.getType().equals("tp")) return c.getIdEc()+"ii";
        return String.valueOf(c.getIdEc());
        
    }
    
    @Override
    public String getBaliseDownloadIcs(Creneau c,int pr,int nbrPr) {
     
        return "<li> <a href='getCalendIcsAct.do?type=ec&id="+c.getPromotion()
                +"&GrpAnneeEc="+c.getIdEc()+"&periode=0&nbrPriode=0'>"
            + "Télécharger le calendrier ics de cet emplois du temps</a></li><br/>";
    }
    
}
